from enum import IntEnum, unique

@unique
class ThirdPartner(IntEnum):
    """合作方枚举"""
    XMeta = 1  # xmeta数字藏品交易平台
    WaveUp = 2  # waveup数字藏品交易平台

    @classmethod
    def get_description(cls, value: int) -> str:
        """获取合作方描述"""
        partner_map = {
            cls.XMeta: "xmeta数字藏品交易平台",
            cls.WaveUp: "waveup数字藏品交易平台"
        }
        return partner_map.get(value, "未知合作方")
    
@unique
class MonitorBuyStatus(IntEnum):
    """监控购买状态枚举"""
    MONITORING = 0  # 监控中
    COMPLETED = 1  # 已完成
    PAUSED = 2  # 已暂停
    CANCELLED = 3  # 已取消
    @classmethod
    def get_description(cls, value: int) -> str:
        """获取监控购买状态描述"""
        status_map = {
            cls.MONITORING: "监控中",
            cls.COMPLETED: "已完成",
            cls.PAUSED: "已暂停",
            cls.CANCELLED: "已取消",
        }
        return status_map.get(value, "未知状态")

@unique
class SwapRecordStatus(IntEnum):
    """兑换记录状态枚举"""
    Pending = 0  # 待处理
    Completed = 1  # 已完成
    Failed = 2  # 兑换失败
    @classmethod
    def get_description(cls, value: int) -> str:
        """获取兑换记录状态描述"""
        status_map = {
            cls.Pending: "待处理",
            cls.Completed: "已完成",
            cls.Failed: "兑换失败",
        }
        return status_map.get(value, "未知状态")